package com.idealighter.game.games.fruitslot.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.games.fruitslot.manager.FruitslotMgr;
import com.idealighter.game.games.fruitslot.message.ReqBillMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.Fruitslot.BILL)
public class ReqBillHandler implements ReqMessageHandler {
  @Inject
  private FruitslotMgr fruitslotMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqBillMsg msg = (ReqBillMsg) message;
    return fruitslotMgr.bill(player, msg.getIndex(), false);
  }
}
